package model

import "common-admin/entity"

type OrderWholesale struct {
}

func (o *OrderWholesale) FindById(id int) entity.OrderWholesale {
	db := Model().getDb()
	var order entity.OrderWholesale
	db.First(&order, id)
	defer Model().Close()
	return order
}

func (o *OrderWholesale) FindAll(id int) []entity.OrderWholesale {
	db := Model().getDb()
	orders := make([]entity.OrderWholesale, 0)
	db.First(&orders)
	defer Model().Close()
	return orders
}
